package com.ibeeking.found.common.enums.pay;

/**
 * @ClassName FinConfigPayChannelEnum
 * @Description 各种付款渠道的常量定义
 * @Author ibeeking
 * @Date 2020-06-29 14:54
 **/
public enum FinConfigPayChannelEnum {
    /**
     * 付款渠道配置
     */
    PAY_CHANNEL_WECHAT_ENTERPRISE("pay_channel_wechat_enterprise","企业微信支付"),
    PAY_CHANNEL_BANK_CARD("pay_channel_wechat_to_bank","付款到银行卡"),
    ;

    private String code;
    private String value;

    FinConfigPayChannelEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getNameByCode(String code) {
        for (FinConfigPayChannelEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getValue();
            }
        }
        return null;
    }
}
